// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_AGENT
// * CreateDate    : 2014-06-05 18:30:03
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:03
// * LastChanger   : 2014-06-05 18:30:03
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HrAgentEntity : EntityBase
    {
        public HrAgentTable TableSchema
        {
            get
            {
                return HrAgentTable.Current;
            }
		}
		
		public HrAgentEntity()
        {

        }
		
		public HrAgentEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.AgentId = Convert.ToString(CommonFunctions.ToObject(dr["AGENT_ID"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.FromDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FROM_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public HrAgentEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.AgentId = Convert.ToString(CommonFunctions.ToObject(dr["AGENT_ID"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.FromDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FROM_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrAgentTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string PersonId
        {
            get { return Convert.ToString(GetData(HrAgentTable.C_PERSON_ID)); }
            set { SetData(HrAgentTable.C_PERSON_ID, value); }
        }
		
        [DataMember]
        public string AgentId
        {
            get { return Convert.ToString(GetData(HrAgentTable.C_AGENT_ID)); }
            set { SetData(HrAgentTable.C_AGENT_ID, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(HrAgentTable.C_STATUS)); }
            set { SetData(HrAgentTable.C_STATUS, value); }
        }
		
        [DataMember]
        public DateTime FromDate
        {
            get { return Convert.ToDateTime(GetData(HrAgentTable.C_FROM_DATE)); }
            set { SetData(HrAgentTable.C_FROM_DATE, value); }
        }
		
        [DataMember]
        public DateTime EndDate
        {
            get { return Convert.ToDateTime(GetData(HrAgentTable.C_END_DATE)); }
            set { SetData(HrAgentTable.C_END_DATE, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(HrAgentTable.C_REMARK)); }
            set { SetData(HrAgentTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

